<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>赐缘战场 - 登录/注册</title>
    <style></style>
    <link rel="stylesheet" href="首页.css">
</head>
<body>
    <h1>赐缘战场</h1>

    <div class="login">
        <h2>登录</h2>
        <form onsubmit="login(event)">
            <label for="username" class="username">用户名：</label> 
            <input type="text" id="username" name="username" required oninput="inputLimit(event)"><br>

            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required><br>

            <button type="submit">登录</button>
            <button type="button" onclick="register()">注册</button>
        </form>
    </div>

    <!-- 注册模态框 -->
    <div id="registerModal" class="modal">
        <div class="modal-content">
            <span class="close" onclick="closeRegisterModal()">&times;</span>
            <h2>用户注册</h2>
            <div class="register-form">
                <label for="regUsername">用户名：</label>
                <input type="text" id="regUsername" name="regUsername" required><br>

                <label for="regPhone">手机号码：</label>
                <input type="tel" id="regPhone" name="regPhone" required oninput="inputLimit(event)"><br>

                <label for="regPassword">密码：</label>
                <input type="password" id="regPassword" name="regPassword" required><br>

                <label for="regConfirmPassword">确认密码：</label>
                <input type="password" id="regConfirmPassword" name="regConfirmPassword" required><br>

                <button type="button" onclick="submitRegister()">注册</button>
            </div>
        </div>
    </div>
    <!-- 引入登录相关的JavaScript -->
    <script src="login.js"></script>
</body>
</html>